<?php
class FrmComponentsList {
    private $setter;
    private $iconBoxComponents;
    private $componentsList;


    public function __construct($componentsList) {
        $this->setter=new Setter("../Config");
        $this->componentsList=$componentsList;
        $this->iconBoxComponents=new IconBox($iconHeight="128", $iconWidth="128", $iconPadding="4", $iconSpacing="4", $iconText="yes", $containerClass="container", $iconClass="icon");
        for($i=0;$i<count($this->componentsList);$i++){
                $comp=explode("=", $this->componentsList[$i]);
                $this->iconBoxComponents->addIcon($iconName="component", $iconId="component",$iconAlt=$comp[0], $iconValue=$this->componentsList[$i], $iconNote=$comp[0], $iconSrc="../Themes/".$this->setter->getTheme()."/Images/component.png", $iconTitle="Select Component".$comp[0], $iconType="button", $eventsList=array("onclick"=>"POSTMethodSend('component','divContent','../Events/EventsFrmComponentsList.php')"));    
        }
            
    }
    public function setVisible($visible=TRUE){
        if($visible==TRUE){
            $this->iconBoxComponents->show($cols=1, $rows=count($this->componentsList));
        }
       
    }
        
}